//
//  MenuCell.m
//  reSearchDemo
//
//  Created by 科技 on 15/8/28.
//  Copyright (c) 2015年 Kiwaro. All rights reserved.
//

#import "MenuCell.h"

@implementation MenuCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier menuType:(XLmenu)menuType {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.menuType = menuType;
        nameLabel = [[UILabel alloc] init];
        
        [self.contentView addSubview:nameLabel];
    }
    
    return self;
}
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        nameLabel = [[UILabel alloc] init];
        
        [self.contentView addSubview:nameLabel];
    }
    
    return self;
}

- (void)setName:(NSString *)name {
    if (_menuType == firstMenu) {
        nameLabel.frame = CGRectMake(20, 10, 200, 20);
    }else {
        nameLabel.frame = CGRectMake(40, 10, 200, 20);
        nameLabel.textColor = [UIColor lightGrayColor];
        nameLabel.font = [UIFont systemFontOfSize:13];
    }
    nameLabel.text = name;
    
    _height = 40;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
